<br/>
<?php
include_once 'prepend.inc.php';
	$name = '';
	$chkCondition = new QQConditionEqual(QQN::Sharedetails()->Asin,$_ITEM->Asin);
	$cnt = Sharedetails::QueryCount($chkCondition);
	$objShare = Sharedetails::QueryArray($chkCondition);
	foreach($objShare as $val)
	{
		$name = $val->FullName;
	}
/*
 * If the item is shared so not show it.
 */	
if($cnt == 0 )
{
	

?>

<table>
	<tr>
		<td>
			<div>
				<?php
					if($_ITEM->ImageURL <> '')
					{
						$img = $_ITEM->ImageURL;
					}
					else
					{
						$img = '../assets/images/48x48/help.png';
					}
				?> 
				<img src='<?php _p($img);?>' width=95px height=110px></img>
			 </div>
			<div> 
				<?php 
					if($cnt <= 0 )
					{
						$item_pass = $_ITEM->Id . '~' . $_ITEM->Title;
						$btnChoose = new QImageButton($this->dtrAssets);
						$btnChoose->ImageUrl = '../assets/images/32x32/add_to_shopping_cart.png';
						$btnChoose->AlternateText = 'Add to Basket';
						$btnChoose->AddAction(new QClickEvent(),new QServerAction('ChooseAssets_Click'));
						$btnChoose->ActionParameter  = $item_pass;
						$btnChoose->Render();
					}
					else
					{ ?>
					<b>
						<?php _p('This item is shared with ' . $name); ?>
					</b><?php
					}
				?>
			</div>
		</td>
		
		
		<td valign="top">
				<div><a href=<?php _p($_ITEM->DetailPageURL); ?>><?php _p($_ITEM->Title);?></a>
				</div>
				<?php if($_ITEM->ProductGroup == "Book") { //Book template begins here ?>
				<div>ASIN: <?php _p($_ITEM->Asin);?></div>
				<div><?php _p($_ITEM->Author); ?></div>
				<div><?php _p($_ITEM->NumberOfPages);?> Pages</div>
				<div>Published By: <?php if($_ITEM->Publisher <> '')
				{
					_p($_ITEM->Publisher);
				}
				else
				{
					_p('Unavailable');
				}
		
		
		
				//Movies template begins here
				}
				elseif($_ITEM->ProductGroup == "DVD")
				{ ?>
				<div>ASIN: <?php isset($_ITEM->Asin)?_p($_ITEM->Asin):_p('');?></div>
				<div>Cast: <?php $strActor = '';if(isset($_ITEM->Actor)) _p($_ITEM->Actor);?></div>
				<div>Director: <?php $strDirector = '';if(isset($_ITEM->Director)) $strDirector =$_ITEM->Director; _p($_ITEM->Director);?>
				</div>
				<div>Movie Time: <?php $strRunningTime = '';if(isset($_ITEM->RunningTime)) _p($_ITEM->RunningTime);?>
				minutes</div>
				<?php }
				elseif($_ITEM->ProductGroup == "Music")
				{?>
				<div>ASIN: <?php isset($_ITEM->Asin)?_p($_ITEM->Asin):_p('');?></div>
				<div>Artist: <?php $strArtist = '';if(isset($_ITEM->Artist)){if(is_array($_ITEM->Artist)){foreach($_ITEM->Artist as $val){$strArtist  =  $strArtist . ',' . $val ;}}else{$strArtist = $_ITEM->Artist;}}?></div>
				<div>Label: <?php isset($_ITEM->Label)?_p($_ITEM->Label):_p('');?></div>
				<div>Number of Discs: <?php isset($_ITEM->NumberOfDiscs)?_p($_ITEM->NumberOfDiscs):_p('');?>
				</div>
				<?php } ?>
			</div>
		</td>
		<?php
}
		?>
	</tr>
</table>
<br />
<br />
	